package com.lmscn.lms.api.model;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Model;

import java.util.List;

/**
 * Created by Czl on 2015/9/10.
 */
@SuppressWarnings("serial")
public class LeiTai extends Model<LeiTai> {

    public static final LeiTai dao = new LeiTai();

    /**
     * 查询所有的擂台
     * @return
     */
    public List<LeiTai> getLeitaiList(){
        return dao.find("select t.* from t_leitai t order by seq desc");
    }
    /**
     * 获取最新一期擂台
     */
    public LeiTai getLast(){
        return LeiTai.dao.findFirst("select t.* from t_leitai t order by seq desc");
    }



}
